layui.config({
    base: CXL.ctxPath + '/layuiadmin/' //静态资源所在路径
}).extend({
    index: 'lib/index' //主入口模块
}).use(['index', 'form','laydate'], function(){
    var form = layui.form;
    var admin = layui.admin;
    var table = layui.table;
    var laydate = layui.laydate;

    var $ = layui.$;
    var taskId = $('#taskId').val();

    var Page = {
        tableId: 'task-detail',
        url:CXL.ctxPath + '/sys/addTask/queryTaskDetail',
        initColumn:function(){
            return [[
                {type : 'numbers',title : '序号',width:'3%'},
                {field:'taskId',title:'taskId',hide:true,width:'1%'},
                {field:'materialName',title:'物料名称',width:'12%'},
                {field:'materialNo',title:'物料编码',width:'12%'},
                {field:'status',title:'任务状态',width:'12%',templet:"#online-status"},
                {field:'errMsg',title:'错误信息',width:'18%'},
                {field:'targetWeight',title:'目标重量',width:'12%'},
                {field:'actualWeight',title:'实际重量',width:'12%'},
                {field:'completeDate',title:'完成时间',width:'16%'}
            ]];
        },
    };



    table.render({
        elem:'#' + Page.tableId,
        url:Page.url + '?taskId=' + taskId ,
        height:'550px',
        page:false,
        autoSort:false,
        cols:Page.initColumn()
    });






})